package com.nashuju.web.controller.sw;

import org.durcframework.core.GridResult;
import org.durcframework.core.MessageResult;
import org.durcframework.core.controller.CrudController;
import com.nashuju.web.entity.sw.SAssociationRecord;
import com.nashuju.web.entity.sw.SAssociationRecordSch;
import com.nashuju.web.service.sw.SAssociationRecordService;
import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.ResponseBody;

@Controller
public class SAssociationRecordController extends
		CrudController<SAssociationRecord, SAssociationRecordService> {

		//新增记录
	@RequestMapping("/addSAssociationRecord.do")
	public @ResponseBody
	MessageResult addSAssociationRecord(SAssociationRecord entity) {
		return this.save(entity);
	}

	//删除记录
	@RequestMapping("/delSAssociationRecord.do")
	public @ResponseBody
	MessageResult delSAssociationRecord(SAssociationRecord entity) {
		return this.delete(entity);
	}
	
	//修改记录
	@RequestMapping("/updateSAssociationRecord.do")
	public @ResponseBody
	MessageResult updateSAssociationRecord(SAssociationRecord entity) {
		return this.update(entity);
	}

	//条件查询分页操作
	@RequestMapping("/listSAssociationRecord.do")
	public @ResponseBody
	GridResult listSAssociationRecord(SAssociationRecordSch searchEntitySch) {
		return this.query(searchEntitySch);
	}

	
	//条件查询并返回所有记录
	@RequestMapping("/listAllSAssociationRecord.do")
    public @ResponseBody Object listAllSAssociationRecord(SAssociationRecordSch searchEntitySch) {
        return this.queryAll(searchEntitySch);
    }

    //获取详细信息
	@RequestMapping("/getSAssociationRecordById.do")
    public @ResponseBody SAssociationRecord getSAssociationRecordById(SAssociationRecord entity) {
        return this.getService().get(entity.getId());
    }

 	

}